﻿using Inaction.Criteria;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Text;

namespace Inaction.Linq.Clause
{
    class AndClause : BinaryClause
    {
        public AndClause(LinqRoot root,BinaryExpression e)
            : base(root, e)
        {
            Logic = CriteriaLogic.And;
            Left = LinqParse.Parse(e.Left, root);
            Right = LinqParse.Parse(e.Right, root);
        }

        public AndClause(WhereClause left, WhereClause right)
            : base(left.Root, left.Express)
        {
            Logic = CriteriaLogic.And;
            Left = left;
            Right = right;
        }
    }
}
